package com.tengfei.blogsystem.service.impl;

import com.tengfei.blogsystem.utils.EmailSender;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import javax.mail.MessagingException;

/**
 * @version v1.0
 * @author} feige
 * @date 2021-10-17-19:33
 * @description 异步服务
 */
@Service
public class TaskServiceImpl {

    @Async
    public void sendEmailVerifyCode(String code, String email) throws MessagingException {
        EmailSender.emailSend(String.valueOf(code), email);
    }
}
